From: Keir Fraser Date: Wed, 7 Apr 2010 07:17:21 +0000 (+0100) Subject: mini-os: Fix xenbus_switch_state's transaction retry X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12427 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=cdabe14bff38e2e9e8dac9ad5d5fe40499cc38e8;p=xen.git mini-os: Fix xenbus_switch_state's transaction retry When xenbus_switch_state has to retry the transaction which it just created, it needs to recreate another one. Clearing xbt triggers it. Signed-off-by: Samuel Thibault --- diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c index 22f109fd07..a8081fd943 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transaction_t xbt, const char* path, XenbusStat msg = xenbus_write(xbt, path, value); exit: - if (xbt_flag) + if (xbt_flag) { msg2 = xenbus_transaction_end(xbt, 0, &retry); + xbt = XBT_NIL; + } if (msg == NULL && msg2 != NULL) msg = msg2; } while (retry);